import 'package:flutter/material.dart';
import 'package:shared_preferences/shared_preferences.dart';

class Storage {

  static Future<void> setString(key, value) async {
    SharedPreferences sp = await SharedPreferences.getInstance();
    sp.setString(key, '$value');
  }

  static Future<String?> getString(key) async {
    SharedPreferences sp = await SharedPreferences.getInstance();
    dynamic str = sp.getString(key);
    if(str == null) return "";
    return str;
  }
}
